All Questions
52 questions
1vote
1answer
197views
HTML required form validation is not giving any warning
I have a register form and I have 3 inputs. They are working well when I post the values to the controller but when I don't fill them in and click the submit button, it's not allowing me to submit ...
0votes
1answer
201views
ValidationSummary does not showing all the error
In my page, there is a ValidationSammuery which is showing error message for two fields only even though there is error on multiple fileds. Here is my model - [Required(ErrorMessage = "Plan ...
0votes
1answer
4kviews
JQuery Validation showing "Please enter a multiple of 0.01" on HTML number textbox
I have an ASP.NET MVC5 project which uses the built-in jQuery validation library. I have declared a textbox that is to accept a number that must be to two decimal places: @Html.TextBox("", Model, ...
0votes
1answer
146views
Footable and Validation error message in Mobile view MVC
In my MVC 5 Web App I use footable. In a table I have fields radio buttons for example that are built the form. here is the code: <thead> <tr> <th>&...
2votes
2answers
1kviews
MVC html5 validation [duplicate]
I just want to clear some things up about ASP.NET MVC and HTML5 validation. I disabled all jQuery validation on my project so I could use only HTML5 validation as it looks and feels much better than ...
0votes
2answers
3kviews
Make a field not [Required] in certain situations?
I have a model that includes the following property: [Required] public string City { get; set; } Basically, a user selects a stored value from a dropdown. The fields in my partial view are populated ...
0votes
1answer
1kviews
Using HTML Validation Popups with jQuery Unobtrusive Validations
I have an ASP.NET MVC site that uses Data Annotations for validations and I'd like to get "free" client-side validations. Most simple ones work well and Foolproof helps me with more complex ...
-1votes
1answer
449views
Disable (configure) the jquery-validation for input?
Sorry for translate. I could not find a solution. Input added to the view manually is not associated with the model. The second input is just for comparison: @using (Html.BeginForm()) { ... &...
1vote
0answers
62views
HTML 5 input date does not validated on change
I validate my model by using data annotations: ... [Required(ErrorMessage = "Please enter a due date of the task")] [DataType(DataType.Date)] [DisplayFormat(ApplyFormatInEditMode = true,...
-1votes
2answers
214views
@Html.DropDownListFor not populating with validation element
I have an MVC project in studio 2013 based on C#. I have a number of fields on a web pags using razor syntax some of these are just regular @Html.EditorFor() with a class of @class = "form-control" ...
0votes
1answer
2kviews
Email Validation for html helper - ASP.Net
I have an Asp.Net MVC project. I am trying to make an email validation for an editorFor. Based on what i've researched the way [in this answer: How to apply input which has a type email to to HTML ...
-1votes
1answer
401views
Custom class validation not working?
I am currently developing a web project with ASP.NET MVC. I have a create page in it, and it creates an entity that corresponds to a database table through SQL server. I needed some validation that ...
0votes
1answer
1kviews
ASP.NET MVC: input-validation-valid applied style not working
I found this article and I know its for webpages and not for MVC. My question or problem is the following. If a user provides the correct input for a textbox, I want to change its background-color to ...
1vote
1answer
596views
@Html.ValidationFor() an @Html.EditorFor(x => x.Name, typeof(string).FullName)
Thanks in advance for your help. I have a rickety old MVC client as part of my VS Solution, we'll call it ApiClient (a backend client). The Root Model, we'll call it User, has all the Validation ...
0votes
1answer
2kviews
AllowHtml works on Create but not on Edit ASP.Net MVC 5
This is an ASP.Net MVC 5 project I have a simple model whose one of its properties allows a HTML input: public class FooModel { //other properties [AllowHtml] public string BarField { ...